package Logic;

import java.util.List;



public class VipIdManager {
	private int last;
	private List<Integer> reuseID;
	public VipIdManager(int last,List<Integer> reuseID){
		this.last=last;
		this.reuseID=reuseID;
		
	}
	public int newID(){
		int temp = 0;
		if(reuseID==null){
			temp=++last;
		}else{
			temp=reuseID.get(0);
			reuseID.remove(0);
		}
		return temp;
	}
	public void deleteID(int number){
		reuseID.add(number);
	}
	public void deleteLast(){
		last--;
	}

}
